package com.mbc.hr.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_Overtime")
@NamedQueries({
	@NamedQuery(name="Overtime.getOTCount",query = "SELECT count(ot.otId) From Overtime ot WHERE ot.otDate BETWEEN :startDate AND :endDate AND ot.employeeId = :employeeId"),
	@NamedQuery(name="Overtime.findAllByDate",query = "SELECT ot From Overtime ot WHERE ot.otDate BETWEEN :startDate AND :endDate"),
	@NamedQuery(name="Overtime.findByDateNEmployeeId",query="SELECT ot FROM Overtime ot WHERE (ot.otDate BETWEEN :startDate AND :endDate) AND ot.employeeId = :employeeId")
})

public class Overtime implements Serializable {
	
	@Id
	private long otId;
	private long employeeId;
	private long branchId;
	private Date otDate;
	private int otMinutes;
	private String task;
	private long createdBy;
	private Date createdDate;
	private Long modifiedBy;
	private Date modifiedDate;
	private Long approvedBy;
	private Date approvedDate;
	private byte status;
	private String employeeName;
	private String reason;
	private Long otType;
	
	@Transient
	private String otTypeDescription;
	
	public Long getotId(){
		return otId;
	}

	public void setotId(Long otId){
		this.otId = otId;
	}
	
	public Long getEmployeeId(){
		return employeeId;
	}

	public void setEmployeeId(Long empId){
		this.employeeId = empId;
	}
	
	public Long getBranchId(){
		return branchId;
	}

	public void setBranchId(Long branchId){
		this.branchId = branchId;
	}
	
	public Date getOtDate(){
		return otDate;
	}

	public void setOtDate(Date otDate){
		this.otDate = otDate;
	}
	
	public int getOtMinutes(){
		return otMinutes;
	}
	public void setOtMinutes(int otMinutes){
		this.otMinutes = otMinutes;
	}
	
	public String getTask(){
		return task;
	}
	public void setTask(String task){
		this.task = task;
	}
	
	public Long getCreatedBy(){
		return createdBy;
	}

	public void setCreatedBy(Long loginId){
		this.createdBy = loginId;
	}
	
	public Date getCreatedDate(){
		return createdDate;
	}

	public void setCreatedDate(Date createdDate){
		this.createdDate = createdDate;
	}
	
	public Long getModifiedBy(){
		return modifiedBy;
	}

	public void setModifinedBy(Long modifiedBy){
		this.modifiedBy = modifiedBy;
	}
	
	public Date getModifiedDate(){
		return modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate){
		this.modifiedDate = modifiedDate;
	}
	public Long getApprovedBy(){
		return approvedBy;
	}

	public void setApprovedBy(Long approvedBy){
		this.approvedBy = approvedBy;
	}
	
	public Date getApprovedDate(){
		return approvedDate;
	}

	public void setApprovedDate(Date approvedDate){
		this.approvedDate = approvedDate;
	}
	
	public byte getStatus() {
		return status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}
	
	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}
	
	public String getReason(){
		return reason;
	}
	public void setReason(String reason){
		this.reason = reason;
	}

	public Long getOtType() {
		return otType;
	}

	public void setOtType(Long otType) {
		this.otType = otType;
	}

	public String getOtTypeDescription() {
		return otTypeDescription;
	}

	public void setOtTypeDescription(String otTypeDescription) {
		this.otTypeDescription = otTypeDescription;
	}
}
